/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gui;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.plaf.DimensionUIResource;

import com.beans.AppelDoffre;
import com.beans.Users;
import com.metier.AppelDoffreMetier;
import com.metier.UsersMetier;

/**
 *
 * @author moussa
 */
public class PanelModifierAppelOffre extends javax.swing.JPanel {
	private String valeurSelectionner;
	private String refToModifi="";

    /**
     * Creates new form PanelAjouterAppelOffre
     */
    public PanelModifierAppelOffre() {
       // initComponents();
    }
    
    public PanelModifierAppelOffre( JButton buttonAnnuler){
    	
    	initComponents(buttonAnnuler);
    	
  	
    }

    
    //initComponents
    private void initComponents(JButton bouttonANNULER) {

        labelDateAchat = new javax.swing.JLabel();
        jDateChooserDateDepTech = new com.toedter.calendar.JDateChooser();
        labelDateLine = new javax.swing.JLabel();
        jDateChooserDateLimite = new com.toedter.calendar.JDateChooser();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        dateAchat = new com.toedter.calendar.JDateChooser();
        jLabel3 = new javax.swing.JLabel();
        jDateChooserDateDepFin = new com.toedter.calendar.JDateChooser();
        labelDateDeliberation = new javax.swing.JLabel();
        jDateChooserDateDelib = new com.toedter.calendar.JDateChooser();
        jLabel5 = new javax.swing.JLabel();
        labelOffreTechnique = new javax.swing.JLabel();
        textFieldOOffreTechnique = new javax.swing.JTextField();
        textFieldOOffreTechnique.addKeyListener(new java.awt.event.KeyAdapter() {
			public void keyTyped(java.awt.event.KeyEvent e) {
				
				if ((e.getKeyChar() > '9') || (e.getKeyChar() < '0'))
					e.setKeyChar('\0');
			}

		});
        jLabel7 = new javax.swing.JLabel();
        jTextField2 = new javax.swing.JTextField();
        labelOpportinuite = new javax.swing.JLabel();
        textFieldOpportinuite = new javax.swing.JTextField();
        textFieldOpportinuite.addKeyListener(new java.awt.event.KeyAdapter() {
			public void keyTyped(java.awt.event.KeyEvent e) {
				
				
				if ((e.getKeyChar() > '9') || (e.getKeyChar() < '0'))
					e.setKeyChar('\0');
			}

		});
        jLabel9 = new javax.swing.JLabel();
        jTextFieldLead = new javax.swing.JTextField();
        labelCommission = new javax.swing.JLabel();
        textFieldCommission = new javax.swing.JTextField();
        textFieldCommission.addKeyListener(new java.awt.event.KeyAdapter() {
			public void keyTyped(java.awt.event.KeyEvent e) {
				
				if ((e.getKeyChar() > '9') || (e.getKeyChar() < '0'))
					e.setKeyChar('\0');
			}

		});
        jLabel11 = new javax.swing.JLabel();
        referenceAoToModif = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextAreaDescription = new javax.swing.JTextArea();
        jLabel13 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTextAreaCommentaire = new javax.swing.JTextArea();
        buttonValider = new javax.swing.JButton();
        buttonAnnuler = new javax.swing.JButton();
        jTextFieldSeuilTechnique = new javax.swing.JTextField();
        jLabelNumero = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        dateCreate = new com.toedter.calendar.JDateChooser();
        jLabel8 = new javax.swing.JLabel();
        textFieldNom = new javax.swing.JTextField();
        comboBoxEtat = new javax.swing.JComboBox();
        
        jTextFieldSeuilTechnique.addKeyListener(new java.awt.event.KeyAdapter() {
			public void keyTyped(java.awt.event.KeyEvent e) {
				
				if ((e.getKeyChar() > '9') || (e.getKeyChar() < '0'))
					e.setKeyChar('\0');
			}

		});
       

        setBackground(new java.awt.Color(128, 130, 133));
        setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(191, 36, 94)));
        setForeground(new java.awt.Color(255, 255, 255));
        setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        setMaximumSize(new java.awt.Dimension(1050, 375));
        setPreferredSize(new java.awt.Dimension(1050, 375));

        labelDateAchat.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        labelDateAchat.setForeground(new java.awt.Color(255, 255, 255));
        labelDateAchat.setText("Date Achat :");

        labelDateLine.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        labelDateLine.setForeground(new java.awt.Color(255, 255, 255));
        labelDateLine.setText("Date Limite :");

        jLabel2.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("Date Dep Tech :");

        jLabel3.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(255, 255, 255));
        jLabel3.setText("Date Dep Fin :");

        jDateChooserDateDepFin.setToolTipText("");

        labelDateDeliberation.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        labelDateDeliberation.setForeground(new java.awt.Color(255, 255, 255));
        labelDateDeliberation.setText("Date Deliberation:");

        jLabel5.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        jLabel5.setForeground(new java.awt.Color(255, 255, 255));
        jLabel5.setText("Seuil Technique:");

        labelOffreTechnique.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        labelOffreTechnique.setForeground(new java.awt.Color(255, 255, 255));
        labelOffreTechnique.setText("Offre Technique :");

       
        jLabel7.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        jLabel7.setForeground(new java.awt.Color(255, 255, 255));
        jLabel7.setText("Offre Financiere :");

        

        labelOpportinuite.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        labelOpportinuite.setForeground(new java.awt.Color(255, 255, 255));
        labelOpportinuite.setText("Opportinuite :");

        

        jLabel9.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        jLabel9.setForeground(new java.awt.Color(255, 255, 255));
        jLabel9.setText("Lead :");

        

        labelCommission.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        labelCommission.setForeground(new java.awt.Color(255, 255, 255));
        labelCommission.setText("Commission :");

        

        jLabel11.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        jLabel11.setForeground(new java.awt.Color(255, 255, 255));
        jLabel11.setText("Reference :");

        

        jLabel12.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        jLabel12.setForeground(new java.awt.Color(255, 255, 255));
        jLabel12.setText("Description :");

        jTextAreaDescription.setColumns(20);
        jTextAreaDescription.setRows(5);
        jScrollPane1.setViewportView(jTextAreaDescription);

        jLabel13.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        jLabel13.setForeground(new java.awt.Color(255, 255, 255));
        jLabel13.setText("Commentaire :");

        jTextAreaCommentaire.setColumns(20);
        jTextAreaCommentaire.setRows(5);
        jScrollPane2.setViewportView(jTextAreaCommentaire);
        comboBoxEtat.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {

				Object source = comboBoxEtat.getSelectedItem();
				valeurSelectionner = (String) source;

			}
		});


        buttonValider.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        buttonValider.setText("VALIDER");
        buttonValider.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
            	if (JOptionPane.showConfirmDialog(getFrame(),
						"Voulez-vous vraiment confirmer la modification?",
						"Information", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
            	  AppelDoffreMetier appeDoffreMetier=new AppelDoffreMetier();
            	  AppelDoffre AOModify=new AppelDoffre();
            	  String refCorrespondant =getRefToModifi();
            	  
            	 System.out.println("voici le ref  correspondant à l'utilisateur mofifié "  +refCorrespondant);
            	 AOModify=appeDoffreMetier.findAppelDoffreByReference(refCorrespondant);
            	 
            	 AOModify.setAoComission(Double.parseDouble(textFieldCommission.getText()));
            	 AOModify.setAoCommentaire(jTextAreaCommentaire.getText());
            	 AOModify.setAoDateAchat(dateAchat.getDate());
            	 AOModify.setAoDateCreate(dateCreate.getDate());
            	 AOModify.setAoDateDelib(jDateChooserDateDelib.getDate());
            	 AOModify.setAoDateDepFin(jDateChooserDateDepFin.getDate());
            	 AOModify.setAoDateDepTech(jDateChooserDateDepTech.getDate());
            	 AOModify.setAoDateLine(jDateChooserDateLimite.getDate());
            	 //
            	 AOModify.setAoDesc(jTextAreaDescription.getText());
            	 AOModify.setAoEtat((String)comboBoxEtat.getSelectedItem());
            	 AOModify.setAoIdLead(jTextFieldLead.getText());
            	 AOModify.setAoNumero(textFieldNom.getText());
            	 AOModify.setAoOffreFinanc(Double.parseDouble(jTextField2.getText()));
            	 AOModify.setAoOffreTech(Double.parseDouble(textFieldOOffreTechnique.getText()));
            	 AOModify.setAoOpportunit(textFieldOpportinuite.getText());
            	 AOModify.setAoRef(referenceAoToModif.getText());
            	 appeDoffreMetier.testUpdate(AOModify);
            	 
            	
               
            	}     
            }
        });
      
        

        buttonAnnuler.setFont(new java.awt.Font("Verdana", 3, 14)); 
        buttonAnnuler.setText("ANNULER");
        buttonAnnuler.addActionListener(new ActionListener() {
			
			public void actionPerformed(ActionEvent e) {
				PanelAppelDoffre pan=new PanelAppelDoffre();
				pan.setVisible(true);
			    
				pan.tableauListeAppelDofre();
				pan.getPanelbas().add(new JScrollPane(pan.tableListeAppelDoffre), BorderLayout.CENTER);
				validate();
        
		/*		C:\Program Files (x86)\Intel\iCLS Client\;
				C:\Program Files\Intel\iCLS Client\;
				%SystemRoot%\system32;
				%SystemRoot%;%SystemRoot%\System32\Wbem;
				%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
				C:\Program Files\Intel\WiFi\bin\;
				C:\Program Files\Common Files\Intel\WirelessCommon\;
				C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;
				C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;
				C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;
				C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;
				C:\Program Files\MySQL\MySQL Server 5.5\bin;
				C:\Program Files (x86)\MySQL\MySQL Utilities 1.3.6\;
				%JAVA_HOME%/bin		
				*/
			
			}
		});
        

        jLabelNumero.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        jLabelNumero.setForeground(new java.awt.Color(255, 255, 255));
        jLabelNumero.setText("Numero :");

        jLabel6.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setText("Date Create :");

        jLabel8.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        jLabel8.setForeground(new java.awt.Color(255, 255, 255));
        jLabel8.setText("Etat :");

        comboBoxEtat.setFont(new java.awt.Font("Verdana", 3, 14)); // NOI18N
        comboBoxEtat.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "En cours", "En pause", "Fini", " " }));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(304, 304, 304)
                                .addComponent(buttonValider, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addContainerGap()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(labelDateAchat, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(labelOpportinuite, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(labelCommission, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(labelOffreTechnique)
                                    .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(layout.createSequentialGroup()
                                            .addGap(18, 18, 18)
                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                                .addComponent(dateAchat, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)
                                                .addComponent(jDateChooserDateDepTech, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(textFieldCommission, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(18, 18, 18)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(layout.createSequentialGroup()
                                                .addComponent(textFieldOOffreTechnique, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(18, 18, 18)
                                                .addComponent(jLabel13))
                                            .addComponent(textFieldOpportinuite, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(comboBoxEtat, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 242, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabelNumero, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(48, 48, 48)
                                .addComponent(textFieldNom, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(20, 20, Short.MAX_VALUE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(labelDateDeliberation)
                                    .addComponent(jLabel6))
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(dateCreate, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jDateChooserDateDelib, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(bouttonANNULER)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                            .addGap(25, 25, 25)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(43, 43, 43)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jTextFieldLead, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                                        .addComponent(referenceAoToModif)))
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addGap(33, 33, 33)
                                    .addComponent(jDateChooserDateDepFin, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                        .addComponent(labelDateLine)
                                        .addGap(44, 44, 44)
                                        .addComponent(jDateChooserDateLimite, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(jTextField2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(jTextFieldSeuilTechnique, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(0, 16, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(jTextFieldLead, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGap(35, 35, 35)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel7)))
                                    .addGroup(layout.createSequentialGroup()
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(textFieldOOffreTechnique, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(labelOffreTechnique))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(comboBoxEtat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel8))
                                        .addGap(16, 16, 16)))
                                .addComponent(jLabel1)
                                .addGap(13, 13, 13)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabelNumero)
                                    .addComponent(textFieldNom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel5)
                                    .addComponent(jTextFieldSeuilTechnique, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(23, 23, 23))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel13)
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(referenceAoToModif, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel11))
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(textFieldCommission, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel12))
                            .addComponent(labelCommission, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addGap(14, 14, 14)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(textFieldOpportinuite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(labelOpportinuite))
                        .addGap(145, 145, 145)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jDateChooserDateLimite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(2, 2, 2)
                                        .addComponent(labelDateAchat, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(dateAchat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(labelDateLine, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(31, 31, 31))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jDateChooserDateDelib, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(labelDateDeliberation, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(33, 33, 33)))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jDateChooserDateDepTech, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(dateCreate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jDateChooserDateDepFin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.LEADING)))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 36, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(buttonValider)
                    .addComponent(bouttonANNULER))
                .addContainerGap())
        );
    }

    public JPanel getFrame(){
    	
    	
		return this;
		
    	
    	
    	
    }
    
    
    
    
    
    
    
    
    
    
    

    /**
	 * @return the comboBoxEtat
	 */
	public javax.swing.JComboBox getComboBoxEtat() {
		return comboBoxEtat;
	}

	/**
	 * @param comboBoxEtat the comboBoxEtat to set
	 */
	public void setComboBoxEtat(javax.swing.JComboBox comboBoxEtat) {
		this.comboBoxEtat = comboBoxEtat;
	}

	/**
	 * @return the dateAchat
	 */
	public com.toedter.calendar.JDateChooser getDateAchat() {
		return dateAchat;
	}

	/**
	 * @param dateAchat the dateAchat to set
	 */
	public void setDateAchat(com.toedter.calendar.JDateChooser dateAchat) {
		this.dateAchat = dateAchat;
	}

	/**
	 * @return the dateCreate
	 */
	public com.toedter.calendar.JDateChooser getDateCreate() {
		return dateCreate;
	}

	/**
	 * @param dateCreate the dateCreate to set
	 */
	public void setDateCreate(com.toedter.calendar.JDateChooser dateCreate) {
		this.dateCreate = dateCreate;
	}

	/**
	 * @return the jDateChooserDateDelib
	 */
	public com.toedter.calendar.JDateChooser getjDateChooserDateDelib() {
		return jDateChooserDateDelib;
	}

	/**
	 * @param jDateChooserDateDelib the jDateChooserDateDelib to set
	 */
	public void setjDateChooserDateDelib(
			com.toedter.calendar.JDateChooser jDateChooserDateDelib) {
		this.jDateChooserDateDelib = jDateChooserDateDelib;
	}

	/**
	 * @return the jDateChooserDateDepFin
	 */
	public com.toedter.calendar.JDateChooser getjDateChooserDateDepFin() {
		return jDateChooserDateDepFin;
	}

	/**
	 * @param jDateChooserDateDepFin the jDateChooserDateDepFin to set
	 */
	public void setjDateChooserDateDepFin(
			com.toedter.calendar.JDateChooser jDateChooserDateDepFin) {
		this.jDateChooserDateDepFin = jDateChooserDateDepFin;
	}

	/**
	 * @return the jDateChooserDateDepTech
	 */
	public com.toedter.calendar.JDateChooser getjDateChooserDateDepTech() {
		return jDateChooserDateDepTech;
	}

	/**
	 * @param jDateChooserDateDepTech the jDateChooserDateDepTech to set
	 */
	public void setjDateChooserDateDepTech(
			com.toedter.calendar.JDateChooser jDateChooserDateDepTech) {
		this.jDateChooserDateDepTech = jDateChooserDateDepTech;
	}

	/**
	 * @return the jDateChooserDateLimite
	 */
	public com.toedter.calendar.JDateChooser getjDateChooserDateLimite() {
		return jDateChooserDateLimite;
	}

	/**
	 * @param jDateChooserDateLimite the jDateChooserDateLimite to set
	 */
	public void setjDateChooserDateLimite(
			com.toedter.calendar.JDateChooser jDateChooserDateLimite) {
		this.jDateChooserDateLimite = jDateChooserDateLimite;
	}

	/**
	 * @return the jTextAreaCommentaire
	 */
	public javax.swing.JTextArea getjTextAreaCommentaire() {
		return jTextAreaCommentaire;
	}

	/**
	 * @param jTextAreaCommentaire the jTextAreaCommentaire to set
	 */
	public void setjTextAreaCommentaire(javax.swing.JTextArea jTextAreaCommentaire) {
		this.jTextAreaCommentaire = jTextAreaCommentaire;
	}

	/**
	 * @return the jTextAreaDescription
	 */
	public javax.swing.JTextArea getjTextAreaDescription() {
		return jTextAreaDescription;
	}

	/**
	 * @param jTextAreaDescription the jTextAreaDescription to set
	 */
	public void setjTextAreaDescription(javax.swing.JTextArea jTextAreaDescription) {
		this.jTextAreaDescription = jTextAreaDescription;
	}

	/**
	 * @return the jTextField2
	 */
	public javax.swing.JTextField getjTextField2() {
		return jTextField2;
	}

	/**
	 * @param jTextField2 the jTextField2 to set
	 */
	public void setjTextField2(javax.swing.JTextField jTextField2) {
		this.jTextField2 = jTextField2;
	}

	/**
	 * @return the jTextFieldLead
	 */
	public javax.swing.JTextField getjTextFieldLead() {
		return jTextFieldLead;
	}

	/**
	 * @param jTextFieldLead the jTextFieldLead to set
	 */
	public void setjTextFieldLead(javax.swing.JTextField jTextFieldLead) {
		this.jTextFieldLead = jTextFieldLead;
	}

	/**
	 * @return the referenceAoToModif
	 */
	public javax.swing.JTextField getjTextFieldReference() {
		return referenceAoToModif;
	}

	/**
	 * @param referenceAoToModif the referenceAoToModif to set
	 */
	public void setjTextFieldReference(javax.swing.JTextField jTextFieldReference) {
		this.referenceAoToModif = jTextFieldReference;
	}

	/**
	 * @return the jTextFieldSeuilTechnique
	 */
	public javax.swing.JTextField getjTextFieldSeuilTechnique() {
		return jTextFieldSeuilTechnique;
	}

	/**
	 * @param jTextFieldSeuilTechnique the jTextFieldSeuilTechnique to set
	 */
	public void setjTextFieldSeuilTechnique(
			javax.swing.JTextField jTextFieldSeuilTechnique) {
		this.jTextFieldSeuilTechnique = jTextFieldSeuilTechnique;
	}

	/**
	 * @return the textFieldCommission
	 */
	public javax.swing.JTextField getTextFieldCommission() {
		return textFieldCommission;
	}

	/**
	 * @param textFieldCommission the textFieldCommission to set
	 */
	public void setTextFieldCommission(javax.swing.JTextField textFieldCommission) {
		this.textFieldCommission = textFieldCommission;
	}

	/**
	 * @return the textFieldNom
	 */
	public javax.swing.JTextField getTextFieldNom() {
		return textFieldNom;
	}

	/**
	 * @param textFieldNom the textFieldNom to set
	 */
	public void setTextFieldNom(javax.swing.JTextField textFieldNom) {
		this.textFieldNom = textFieldNom;
	}

	/**
	 * @return the textFieldOOffreTechnique
	 */
	public javax.swing.JTextField getTextFieldOOffreTechnique() {
		return textFieldOOffreTechnique;
	}

	/**
	 * @param textFieldOOffreTechnique the textFieldOOffreTechnique to set
	 */
	public void setTextFieldOOffreTechnique(
			javax.swing.JTextField textFieldOOffreTechnique) {
		this.textFieldOOffreTechnique = textFieldOOffreTechnique;
	}

	/**
	 * @return the textFieldOpportinuite
	 */
	public javax.swing.JTextField getTextFieldOpportinuite() {
		return textFieldOpportinuite;
	}

	/**
	 * @param textFieldOpportinuite the textFieldOpportinuite to set
	 */
	public void setTextFieldOpportinuite(
			javax.swing.JTextField textFieldOpportinuite) {
		this.textFieldOpportinuite = textFieldOpportinuite;
	}












	/**
	 * @return the buttonAnnuler
	 */
	public javax.swing.JButton getButtonAnnuler() {
		return buttonAnnuler;
	}
	

	/**
	 * @return the refToModifi
	 */
	public String getRefToModifi() {
		return refToModifi;
	}

	/**
	 * @param refToModifi the refToModifi to set
	 */
	public void setRefToModifi(String refToModifi) {
		this.refToModifi = refToModifi;
	}

	/**
	 * @param buttonAnnuler the buttonAnnuler to set
	 */
	public void setButtonAnnuler(javax.swing.JButton buttonAnnuler) {
		this.buttonAnnuler = buttonAnnuler;
	}

	/**
	 * @return the buttonValider
	 */
	public javax.swing.JButton getButtonValider() {
		return buttonValider;
	}

	/**
	 * @param buttonValider the buttonValider to set
	 */
	public void setButtonValider(javax.swing.JButton buttonValider) {
		this.buttonValider = buttonValider;
	}

	/**
	 * @return the referenceAoToModif
	 */
	public javax.swing.JTextField getReferenceAoToModif() {
		return referenceAoToModif;
	}

	/**
	 * @param referenceAoToModif the referenceAoToModif to set
	 */
	public void setReferenceAoToModif(javax.swing.JTextField referenceAoToModif) {
		this.referenceAoToModif = referenceAoToModif;
	}












	// Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton buttonAnnuler;
    private javax.swing.JButton buttonValider;
    private javax.swing.JComboBox comboBoxEtat;
    private com.toedter.calendar.JDateChooser dateAchat;
    private com.toedter.calendar.JDateChooser dateCreate;
    
    private com.toedter.calendar.JDateChooser jDateChooserDateDelib;
    private com.toedter.calendar.JDateChooser jDateChooserDateDepFin;
    private com.toedter.calendar.JDateChooser jDateChooserDateDepTech;
    private com.toedter.calendar.JDateChooser jDateChooserDateLimite;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabelNumero;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTextArea jTextAreaCommentaire;
    private javax.swing.JTextArea jTextAreaDescription;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextFieldLead;
    private javax.swing.JTextField referenceAoToModif;
    private javax.swing.JTextField jTextFieldSeuilTechnique;
    private javax.swing.JLabel labelCommission;
    private javax.swing.JLabel labelDateAchat;
    private javax.swing.JLabel labelDateDeliberation;
    private javax.swing.JLabel labelDateLine;
    private javax.swing.JLabel labelOffreTechnique;
    private javax.swing.JLabel labelOpportinuite;
    private javax.swing.JTextField textFieldCommission;
    private javax.swing.JTextField textFieldNom;
    private javax.swing.JTextField textFieldOOffreTechnique;
    private javax.swing.JTextField textFieldOpportinuite;
    // End of variables declaration//GEN-END:variables
}
